package com.apes.report.domain;


import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;


/**
 * 功能：打印模板
 * @author LinWZ
 * @create 2019-03-28 11:20
 */
@Getter
@Setter
@SelectBeforeUpdate
@DynamicInsert
@DynamicUpdate
@Entity
@Table(name = ReportTemplate.CONST_TABLE_NAME,uniqueConstraints = {@UniqueConstraint(columnNames = {"template_name"})})
public class ReportTemplate {
    public static final String CONST_TABLE_NAME = "mas_report_template";

    @Id
    @Column(name = "id",nullable = false, length = 32)
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Integer id;//主键

    @Column(name = "template_name", length = 250)
    private String templatename;//模板名称

    @Lob
    @Basic(fetch = FetchType.LAZY)
    @Column(name = "context", columnDefinition = "CLOB")
    private String context;//模板内容

}
